﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TmU220PrintHelperV2d0.Entity
{
    [Serializable]
    public class dp_rms_print_kit_main_TableClass
    {
        /// <summary>
        /// 打印单id
        /// </summary>
        public Guid id { get; set; }
        /// <summary>
        /// 桌号
        /// </summary>
        public string tableno { get; set; }
        /// <summary>
        /// 打印机名称
        /// </summary>
        public string printer { get; set; }
        /// <summary>
        /// 实际打印机名称
        /// </summary>
        public string printer_action { get; set; }
        /// <summary>
        /// 用户名
        /// </summary>
        public string add_user { get; set; }
        /// <summary>
        /// 入单事件
        /// </summary>
        public DateTime? add_time { get; set; }
        /// <summary>
        /// 打印时间
        /// </summary>
        public DateTime? print_time { get; set; }
        /// <summary>
        /// 标题
        /// </summary>
        public string title { get; set; }
        /// <summary>
        /// 是否警告
        /// </summary>
        public byte is_warnning { get; set; }
        /// <summary>
        /// 打印顺序号
        /// </summary>
        public string print_no { get; set; }
        /// <summary>
        /// 是否已打印
        /// </summary>
        public byte is_printed { get; set; }
        /// <summary>
        /// 是否是繁体
        /// </summary>
        public byte is_Traditional { get; set; }
        public List<dp_rms_print_kit_detail_TableClass> detailList { get; set; }
        public dp_rms_print_kit_main_TableClass()
        {
            id = Guid.NewGuid();
            tableno = "V1";
            printer = "192.168.3.99";
            printer_action = "192.168.3.99";
            add_user = "addUser";
            add_time = DateTime.Now;
            print_time = DateTime.Now;
            title = "菜单";
            is_warnning = 0;// false;
            print_no = "1";
            is_printed = 0;// false;
            detailList = new List<dp_rms_print_kit_detail_TableClass>();
            is_Traditional = 0;// false;
        }
        /// <summary>
        /// 得到类某个属性的值
        /// </summary>
        /// <param name="propertyName"></param>
        /// <returns></returns>
        public object GetPropertyValue(string propertyName)
        {
            return this.GetType().GetProperty(propertyName).GetValue(this, null);
        }
    }
    [Serializable]
    public class dp_rms_print_kit_detail_TableClass
    {
        public Guid id { get; set; }
        public Guid main_id { get; set; }
        public string spec { get; set; }
        public string name { get; set; }
        public decimal? qty { get; set; }
        public int? dispord { get; set; }
        public byte is_modi { get; set; }
        public byte is_void { get; set; }
        public dp_rms_print_kit_detail_TableClass(Guid mainId)
        {
            id = Guid.NewGuid();
            main_id = mainId;
            spec = "";
            name = "";
            qty = 1M;
            dispord = 1;
            is_modi = 0;
            is_void = 0;
        }
        public object GetValue(string propertyName)
        {
            return this.GetType().GetProperty(propertyName).GetValue(this, null);
        }
    }
}
